package Code.Objects.Characters.Player.Weapons.Ranged.AmmoBased.SingleFire;

import org.jrabbit.base.input.MouseHandler;
import org.jrabbit.standard.game.graphics.skins.animation.AnimatedSkin;

import Code.Objects.Characters.Player.Player;
import Code.Objects.Characters.Player.Weapons.Ranged.AmmoBased.PlayerAmmoBasedWeapon;

public class PlayerSingleFireWeapon extends PlayerAmmoBasedWeapon
{
	protected boolean readyToFire;
	
	protected double shotInterval;
	protected double shotTimer;

	public PlayerSingleFireWeapon(AnimatedSkin skin, Player p)
	{
		super(skin, p);
	}
	
	public void activeUpdate(int delta)
	{
		boolean b = shotTimer > 0;
		shotTimer -= delta;
		if(shotTimer <= 0)
		{
			if(b)
			{
				cooldownFinished();
			}
			if(MouseHandler.wasButtonClicked(0))
			{
				shotTimer = shotInterval;
				attemptToFire();
			}
		}
	}
	
	public void cooldownFinished()
	{
		
	}
}
